<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false" %>
<html>
<head>
    <title>产品库存管理</title>
</head>
<body>
<style type="text/css">
</style>
<script>
    $(function () {
        $("tboby tr").addClass("datagrid-row");
        $("#reloadAllproR").linkbutton({
            onClick: function () {
                $("#proRdg").datagrid({
                    url: 'allproRPaged',
                    method: 'post'
                });
                $("#proRdg").datagrid("reload");
            }
        });
    });
    function formatImg(value,row,index){
        return '<a href="to-proImgZoomIn?value='+value+'\" target="_blank"><img  title=\"点击查看高清图\" alt=\"图片暂时无法显示\"  src=\"'+'productionsphotosZoomOut\\'+value+'\"/></a>';
    }
    function formatN(value,row,index) {
        if(value==0){
            return '<b style="font-size:16px;color:grey;">'+value+'</b>';
        }else if(value>0&&value<=100){
            return '<b style="font-size:20px;color:red;">'+value+'</b>';
        }else{
            return '<b style="font-size:24px;color:green;">'+value+'</b>';
        }
    }
</script>
<div class="easyui-layout" data-options="border:false,fit:true">
    <div data-options="region:'center',border:false">
        <table id="proRdg" class="easyui-datagrid table-chance" style="width: auto;" data-options="fit:true,striped:true,height:350,fitColumns:true,
   autoRowHeight:true,nowrap:false,pagination:true,toolbar:'#tools-proR',
pageList:[5,10,15,20],pageSize:5,url:'allproRPaged',method:'post',scrollbarSize:0">
            <thead>
            <tr class="datagrid-header-row">
                <th data-options="field:'code',width:5,align:'center',checkbox:true">编码</th>
                <th data-options="field:'proId',width:5,align:'center'">产品ID</th>
                <th data-options="field:'proName',width:15,align:'center'">产品名称</th>
                <th data-options="field:'proImg',width:10,align:'center'" formatter="formatImg">产品图片</th>
                <th data-options="field:'proNum',width:10,align:'center'" formatter="formatN">产品库存总量</th>
                <th data-options="field:'ptype',hidden:true,align:'center'">产品型号</th>
                <th data-options="field:'pspec',hidden:true,align:'center'">产品规格</th>
                <th data-options="field:'pprice',hidden:true,align:'center'">产品价格</th>
                <th data-options="field:'pcategory',width:10,align:'center',hidden:true">产品分类id</th>
                <th data-options="field:'pCategoryname',hidden:true,width:15,align:'center'">产品分类名</th>
                <th data-options="field:'poprice',width:10,hidden:true,align:'center'">产品成本价</th>
                <th data-options="field:'pbirthday',width:10,hidden:true,align:'center'">生产日期</th>
                <th data-options="field:'pouttime',width:10,hidden:true,align:'center'">失效日期</th>
                <th data-options="field:'pcompany',width:10,hidden:true,align:'center'">生产厂家</th>
                <th data-options="field:'pwunit',width:5,hidden:true,align:'center'">单位</th>
                <%--<th data-options="field:'manager',width:20,align:'center'" formatter="format">操作</th>--%>
            </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
        <!--工具栏-->
        <div id="tools-proR" style="height: 10%;">
            <%--<a href="#" id="IOlog-del-btn" class="easyui-linkbutton" data-options="iconCls:'icon-my_delete',plain:true">批量删除</a>--%>
            <a  id="reloadAllproR" class="easyui-linkbutton" data-options="iconCls:'icon-my_search',plain:true">查询所有</a>

            <input id="proR-Search" class="easyui-searchbox" style="width: 35%;" data-options="searcher:function(value,name){
           $('#proRdg').datagrid({
            url:'findProstockBymh',
            method:'post',
            queryParams:{q:value,b:name}
            });
            $('#proR-Search').searchbox('clear');
            $('#proRdg').datagrid('reload');
           },prompt:'模糊查询产品名称或产品id',menu:'#proRlist'"/>
            <div id="proRlist" class="easyui-menu" style="width:60px;">
                <div name="r1">所有内容</div>
            </div>
            <a href="#" onclick="createDialog('hlQueryproR','高级查询','to-form-proR-highLevel')" class="easyui-linkbutton">高级查询</a>
        </div>
    </div>
    <%--<div data-options="region:'south',border:false" style="overflow:scroll;">--%>
        <%--<div></div>--%>
    <%--</div>--%>
    <%--<script>--%>
        <%--//加载echarts组件--%>
        <%--//柱状图--%>
        <%--simpleBar('main');--%>
        <%--// renderLegend();--%>
        <%--//饼状图--%>
        <%--renderChartBar01('main1');--%>
        <%--//30天日均线流量趋势--%>
        <%--renderLayer04Left('main2');--%>
        <%--//集群性能--%>
        <%--renderLayer04Right('main3');--%>
    <%--</script>--%>
</div>
</body>
</html>

